<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Cache-Control" content="no-siteapp">
<link rel="stylesheet" href="../../../static/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="../../../static/css/public.css" media="all" />
</head>
<body class="childrenBody">
	<form class="layui-form" lay-filter="formTest" id="form">
		<table class="layui-table mag0">
			<colgroup>
				<col width="15%">
				<col width="30%">
				<col width="15%">
				<col width="30%">
			</colgroup>
			<tbody class="detailTable">
				<tr>
					<td class="detailTable_text">员工</td>
					<td><input type="text" class="layui-input" id="ername" name="ername" lay-verify="required" disabled></td>
					<td class="detailTable_text">部门</td>
					<td><input type="text" class="layui-input" id="dname" name="dname" lay-verify="required" disabled></td>
				</tr>
				<tr>
					<td class="detailTable_text">日期</td>
					<td><input type="text" class="layui-input" id="date" name="date" lay-verify="required" disabled></td>
					<td class="detailTable_text">状态</td>
					<td><select name="stat" lay-verify="required" disabled>
							<option value="">请选择</option>
							<option value="1">正常</option>
							<option value="2">异常</option>
					</select></td>
				</tr>
				<tr>
					<td class="detailTable_text">签入时间</td>
					<td><input type="text" class="layui-input" id="ckin" name="ckin" lay-verify="required" disabled></td>
					<td class="detailTable_text">签出时间</td>
					<td><input type="text" class="layui-input" id="ckot" name="ckot" lay-verify="required" disabled></td>
				</tr>
				<tr>
					<td class="detailTable_text">异常原因</td>
					<td colspan="3"><input type="text" class="layui-input" id="remarks" name="remarks" lay-verify="required" disabled></td>
				</tr>
				<tr>
					<td class="detailTable_text">审核状态</td>
					<td><select name="rwst" lay-verify="required" disabled>
							<option value="">无</option>
							<option value="1">待审核</option>
							<option value="2">通过</option>
							<option value="3">不通过</option>
					</select></td>
					<td class="detailTable_text">审核人</td>
					<td><input type="text" class="layui-input" id="rwrname" name="rwrname" lay-verify="required" disabled></td>
				</tr>
				<tr>
					<td class="detailTable_text">审核日期</td>
					<td><input type="text" class="layui-input" id="rwtm" name="rwtm" lay-verify="required" disabled></td>
					<td class="detailTable_text">审核原因</td>
					<td><input type="text" class="layui-input" id="rwrs" name="rwrs" lay-verify="required" disabled></td>
				</tr>
			</tbody>
		</table>
	</form>
	<script type="text/javascript" src="../../../static/js/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../../../static/layui/layui.js"></script>
	<script type="text/javascript" src="../../../static/js/index.js"></script>
	<script type="text/javascript" src="../../../static/custom/js/common.js"></script>
	<script type="text/javascript">
		layui.use([ 'form', 'laydate', 'layer' ], function() {
			var form = layui.form;
			var laydate = layui.laydate;
			var layer = parent.layer === undefined ? layui.layer : top.layer, $ = layui.jquery;
			var toListDetailApi = "../../../attendance/calendar/listDetail";
			var toListDetailMethod = "get";
			//初始化日期组件
			//时间选择器
			laydate.render({
				elem : '#ckin',
				type : 'time'
			});
			//时间选择器
			laydate.render({
				elem : '#ckot',
				type : 'time'
			});
			laydate.render({
				elem : '#date'
			});
			laydate.render({
				elem : '#rwtm'
			});
			$("#form").append('<input type="hidden" name="id" value="" >');
			var eid = getUrlParam("eid");
			var date = getUrlParam("date");
			var jsonData = {};
			jsonData["eid"] = eid;
			jsonData["date"] = date;

			//获取所有员工信息
			loadAjax( toListDetailApi, toListDetailMethod, jsonData, function(response) {
				baseCallBack(response, function(response) {
					console.log(response.data);
					fomrVal(form, "formTest", response.data[0]);
				});
			});

		})
	</script>
</body>
</html>